I wish Qt would default to UTC instead of Local Time!
int override = xstrtoi(opt_gps_utc_offset, nullptr, 10);
if (override) {
gps_timet -= override;
- return QDateTime::fromSecsSinceEpoch(gps_timet);
+ return QDateTime::fromSecsSinceEpoch(gps_timet, Qt::UTC);
}
/* leap second compensation: */
// Future: Consult http://maia.usno.navy.mil/ser7/tai-utc.dat
// use http://www.stevegs.com/utils/jd_calc/ for Julian to UNIX sec
- return QDateTime::fromSecsSinceEpoch(gps_timet); /* returns UTC time */
+ return QDateTime::fromSecsSinceEpoch(gps_timet, Qt::UTC);
}
void